/**
 * @Project: Runer
 * @Title: MeasureUtil.java
 * @Package com.runlooker.runer.util
 * @author town
 * @date 2014-6-9 下午8:32:41
 * @Copyright: 2014 www.yineng.com.cn Inc. All rights reserved.
 * @version V1.0
 */
package com.runlooker.runer.util;

import android.app.Activity;
import android.util.DisplayMetrics;

/**
 * @ClassName MeasureUtil
 * @Description 模块描述
 * @author town
 * @Date 2014-6-9
 */
public class MeasureUtil {
	/**
	 * 获得屏幕宽度
	 * 
	 * 
	 * @Title: getScreenWidth
	 * @Description: 方法描述
	 * @return
	 */
	public static int getScreenWidth(Activity activity) {
		int width = 0;
		DisplayMetrics metric = new DisplayMetrics();
		activity.getWindowManager().getDefaultDisplay().getMetrics(metric);
		width = metric.widthPixels;
		return width;
	}

	/**
	 * 获得屏幕高度
	 * 
	 * 
	 * @Title: getScreenHeight
	 * @Description: 方法描述
	 * @return
	 */
	public static int getScreenHeight(Activity activity) {
		int height = 0;
		DisplayMetrics metric = new DisplayMetrics();
		activity.getWindowManager().getDefaultDisplay().getMetrics(metric);
		height = metric.heightPixels;
		return height;
	}
}
